<template>
      <!-- 底部部分 -->
    <footer class="footer">
      <span class="todo-count" ><strong>{{$store.getters.count}}</strong>剩余</span>
      <ul class="filters">
        <li>
          <a :class="{'selected' : issel === 'all'}" @click="click1('all')" href="#/">全部</a>
        </li>
        <li>
          <a :class="{'selected' : issel === 'no'}" @click="click1('no')" href="#/active">进行中</a>
        </li>
        <li>
          <a :class="{'selected' : issel === 'yes'}" @click="click1('yes')" href="#/completed">已完成</a>
        </li>
      </ul>
      <button class="clear-completed" @click="clickall">清除已完成</button>
    </footer>
</template>

<script>
export default {
  name: 'SrcTodosMyFooter',

  data() {
    return {
       issel: 'all'
    };
  },

  mounted() {
    
  },

computed:{
    count(){ return this.$store.state.count}
},

  methods: {
      click1(val){
            this.issel =val
            this.$store.commit('qiehuan',this.issel)
        },
       clickall(){
          this.$store.commit('clickall')
        },
  },

};
</script>
